package com.hjy.core.transport.netty;

import com.hjy.api.HelloService;
import com.hjy.api.HelloServiceImpl;
import com.hjy.core.annotation.ServiceScan;
import com.hjy.core.nacos.NacosServiceRegistry;
import com.hjy.core.provider.DefaultServiceProvider;
import com.hjy.core.provider.ServiceProvider;
import com.hjy.core.transport.netty.server.NettyServer;

@ServiceScan("com.hjy")
public class TestServer {
    public static void main(String[] args) {
//        HelloServiceImpl helloService = new HelloServiceImpl();
//        // 注册服务到本地服务列表
//        ServiceProvider serviceProvider = new DefaultServiceProvider();
//        serviceProvider.register(helloService);
//        NettyServer nettyServer = new NettyServer("127.0.0.1",9000,new NacosServiceRegistry(),serviceProvider);
//        nettyServer.start();

        NettyServer server = new NettyServer("127.0.0.1", 9000);
        server.start();
    }
}
